Skip to content

Add URL-aware version switcher to API docs via docs-versioning template#157

Merged
petesramek merged 3 commits intodevelop/1.0from
copilot/review-doc-generation-process
Apr 3, 2026
Merged

Add URL-aware version switcher to API docs via docs-versioning template#157
petesramek merged 3 commits intodevelop/1.0from
copilot/review-doc-generation-process

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 3, 2026

  • Add docs-versioning template (layout/_master.tmpl + version-switcher.js)
  • Add versions.json manifest (latest: null, versions: [])
  • Add api-reference/_docs/ to .gitignore and untrack it from git
  • api-reference.json — version content sections removed from repo (populated dynamically by CI)
  • toc.yml — Reference dropdown removed from repo (populated dynamically by CI)
  • Fix versioning job output name bug (friendly-versionversion)
  • Add dotnet-sdk-version: '10.x' env to publish-documentation.yml
  • Rewrite generate-docs job: regenerate metadata, patch api-reference.json/versions.json/toc.yml, inline docfx build
  • Fix docfx-build action: remove internal checkout, fix dotnet-version input reference

- Add docs-versioning/layout/_master.tmpl: overrides modern navbar to
  inject a <select id="version-picker"> in every page's header
- Add docs-versioning/public/version-switcher.js: fetches versions.json,
  detects current version from URL path (e.g. /1.0/...), marks it as
  selected, and navigates to the same relative path in the chosen version
- Add versions.json manifest: latest=1.1, versions=[1.0, 1.1]
- Update api-reference.json: add docs-versioning template, copy versions.json
- Update toc.yml: add v1.1 (latest) entry, v1.0 entry below it

Agent-Logs-Url: https://github.com/petesramek/polyline-algorithm-csharp/sessions/79b105b3-5f4f-495a-a983-d98ce11ba1de

Co-authored-by: petesramek <2333452+petesramek@users.noreply.github.com>
…elease

- Add api-reference/_docs/ to .gitignore (DocFX build output should not be committed)
- Remove _docs/ from git tracking (git rm --cached)
- api-reference.json: remove v1.0/v1.1 content sections and groups (no release yet)
- toc.yml: remove Reference dropdown with version links (no release yet)
- versions.json: set latest=null, versions=[] (no release yet)

Agent-Logs-Url: https://github.com/petesramek/polyline-algorithm-csharp/sessions/9f7fd6fa-c578-43d0-9dd9-6a78abe0a5b5

Co-authored-by: petesramek <2333452+petesramek@users.noreply.github.com>
… for v1.0 release

- Add workflow-level env dotnet-sdk-version: '10.x'
- Fix versioning job output bug: steps.versioning.outputs.friendly-version was always
  empty because the extract-version action outputs 'version', not 'friendly-version'
- Rewrite generate-docs job:
  - Run 'docfx metadata' to regenerate fresh API YAML for the current version
  - Discover all version dirs in api-reference/ to support future multi-version builds
  - Patch api-reference.json with content section + group for each version (dynamically)
  - Patch versions.json with the discovered versions list and latest
  - Patch toc.yml with a Reference dropdown listing all versions (newest first)
  - Inline docfx build (removed docfx-build action call which would overwrite changes)
- Fix docfx-build action:
  - Remove internal checkout step (caller's responsibility, would overwrite changes)
  - Fix dotnet setup to use inputs.dotnet_sdk_version instead of env.dotnet-sdk-version

Agent-Logs-Url: https://github.com/petesramek/polyline-algorithm-csharp/sessions/2dc77f60-d041-415f-ba0b-e00c9f76ff58

Co-authored-by: petesramek <2333452+petesramek@users.noreply.github.com>
@petesramek petesramek marked this pull request as ready for review April 3, 2026 22:27
@petesramek petesramek merged commit 89021ee into develop/1.0 Apr 3, 2026
2 checks passed
@petesramek petesramek deleted the copilot/review-doc-generation-process branch April 3, 2026 22:27
petesramek added a commit that referenced this pull request Apr 3, 2026
…rhaul (#159)

## Overview

Promotes `develop/1.0` to `preview/1.0` in preparation for the 1.0
preview release. This batch brings in a full rewrite of the library's
core, docs, CI/CD pipeline, and test suite accumulated since the last
preview snapshot.

## What's included

### 🏗️ CI/CD & Workflows
- **New workflows**: `bump-version`, `promote-branch` with source-branch
enforcement, auto merge-to-main on release
- **Branch protection**: new `lock`/`unlock` composite actions;
`preview/**` and `release/**` branches are now automatically locked
after creation
- **Fix**: removed invalid `administration` permission from
`release.yml` that caused workflow parse failures (#158)
- **Fix**: corrected pull-request-finding logic in promote workflow
- **Docs publishing**: URL-aware version switcher via `docs-versioning`
template; `versions.json` manifest; reworked `generate-docs` job (#157)

### 📚 Documentation
- New `/docs` developer guides: local development, testing conventions,
benchmarks, composite actions catalogue, CI workflow reference, branch
strategy, versioning pipeline, API doc generation, extensibility guide
(#155)
- Updated API reference YAMLs for version 1.0
- Fixed grammar, TOC typo, and outdated API references in docs
- Updated `CONTRIBUTING.md` with links to all new docs articles
- Flushed `PublicAPI.Unshipped.txt`

### 🔧 Source (library)
- Refactored internal structure: `CoordinateDelta`,
`CoordinateVariance`, `Pow10`, `Defaults`, `ExceptionGuard`, logging
helpers
- Updated `PolylineEncoder`, `PolylineDecoder`, `PolylineEncoding`,
`PolylineEncodingOptions`, `PolylineEncodingOptionsBuilder`
- Public API cleanup; `.editorconfig` updated (primary constructors
disabled)

### ✅ Tests
- Reorganized test files into proper namespace folders (`Abstraction/`,
`Extensions/`, `Internal/`)
- Added new test classes for `CoordinateDelta`, `CoordinateVariance`,
`Pow10`, `ExceptionGuard`, `LogDebugExtensions`, `LogWarningExtensions`,
`InvalidPolylineException`, `PolylineEncodingOptionsBuilder`, and
encoder/decoder extensions
- Removed stale/duplicate test files

### 🛠️ Build & Config
- Cleaned up `PolylineAlgorithm.slnx`, `Directory.Build.props`,
benchmarks config
- Updated `.gitignore` to exclude dynamically generated
`api-reference/_docs/`
- Misc cleanup (removed junk files, updated `AGENTS.md`)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Pete Sramek <petr.sramek@dropoutcoder.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
petesramek pushed a commit that referenced this pull request Apr 4, 2026
)

## Overview

Promotes `preview/1.0` to `release/1.0` in preparation for the 1.0
release. This batch brings in a full rewrite of the library's core,
docs, CI/CD pipeline, and test suite accumulated since the last preview
snapshot.

## What's included

### 🏗️ CI/CD & Workflows
- **New workflows**: `bump-version`, `promote-branch` with source-branch
enforcement, auto merge-to-main on release
- **Branch protection**: new `lock`/`unlock` composite actions;
`preview/**` and `release/**` branches are now automatically locked
after creation
- **Fix**: removed invalid `administration` permission from
`release.yml` that caused workflow parse failures (#158)
- **Fix**: corrected pull-request-finding logic in promote workflow
- **Docs publishing**: URL-aware version switcher via `docs-versioning`
template; `versions.json` manifest; reworked `generate-docs` job (#157)

### 📚 Documentation
- New `/docs` developer guides: local development, testing conventions,
benchmarks, composite actions catalogue, CI workflow reference, branch
strategy, versioning pipeline, API doc generation, extensibility guide
(#155)
- Updated API reference YAMLs for version 1.0
- Fixed grammar, TOC typo, and outdated API references in docs
- Updated `CONTRIBUTING.md` with links to all new docs articles
- Flushed `PublicAPI.Unshipped.txt`

### 🔧 Source (library)
- Refactored internal structure: `CoordinateDelta`,
`CoordinateVariance`, `Pow10`, `Defaults`, `ExceptionGuard`, logging
helpers
- Updated `PolylineEncoder`, `PolylineDecoder`, `PolylineEncoding`,
`PolylineEncodingOptions`, `PolylineEncodingOptionsBuilder`
- Public API cleanup; `.editorconfig` updated (primary constructors
disabled)

### ✅ Tests
- Reorganized test files into proper namespace folders (`Abstraction/`,
`Extensions/`, `Internal/`)
- Added new test classes for `CoordinateDelta`, `CoordinateVariance`,
`Pow10`, `ExceptionGuard`, `LogDebugExtensions`, `LogWarningExtensions`,
`InvalidPolylineException`, `PolylineEncodingOptionsBuilder`, and
encoder/decoder extensions
- Removed stale/duplicate test files

### 🛠️ Build & Config
- Cleaned up `PolylineAlgorithm.slnx`, `Directory.Build.props`,
benchmarks config
- Updated `.gitignore` to exclude dynamically generated
`api-reference/_docs/`
- Misc cleanup (removed junk files, updated `AGENTS.md`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants